import React from 'react';
import style from "./backToTop.module.styl"

export const BackToTop = () => {
  const scrollToTop = () => {
    window.scrollTo({
      top: 0,
      behavior: "smooth"
    })
  }
  return (
    <div className={style.BackToTop} onClick={scrollToTop}>
      <div className={style.iconTop}>&gt;</div>
      <p className={style.text}>TOP</p>
    </div>
  );
};
